Optimal. Leaf size=824 \[ \frac{\left (4 c^2 \left (3 f g^2+h (2 e g-27 d h)\right ) g^2-5 h^2 \left (\left (3 f g^2+3 e h g+7 d h^2\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )-2 c h \left (b g \left (16 f g^2-21 e h g-54 d h^2\right )-2 a h \left (18 f g^2-33 e h g+8 d h^2\right )\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{240 h \left (c g^2-b h g+a h^2\right )^3 (g+h x)^3}+\frac{\left (2 c g \left (3 f g^2+h (2 e g-7 d h)\right )+h \left (10 a h (2 f g-e h)-b \left (13 f g^2-3 e h g-7 d h^2\right )\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{40 h \left (c g^2-b h g+a h^2\right )^2 (g+h x)^4}-\frac{\left (f g^2-h (e g-d h)\right ) \left (c x^2+b x+a\right )^{3/2}}{5 h \left (c g^2-b h g+a h^2\right ) (g+h x)^5}+\frac{\left (32 c^3 d g^3-8 c^2 \left (2 b g (e g+3 d h)+a \left (f g^2-6 e h g+3 d h^2\right )\right ) g-b h \left (\left (3 f g^2+3 e h g+7 d h^2\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )+2 c \left (g \left (5 f g^2+6 e h g+15 d h^2\right ) b^2-6 a h \left (3 f g^2+3 e h g-d h^2\right ) b+4 a^2 h^2 (6 f g-e h)\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{c x^2+b x+a}}{128 \left (c g^2-b h g+a h^2\right )^4 (g+h x)^2}-\frac{\left (b^2-4 a c\right ) \left (32 c^3 d g^3-8 c^2 \left (2 b g (e g+3 d h)+a \left (f g^2-6 e h g+3 d h^2\right )\right ) g-b h \left (\left (3 f g^2+3 e h g+7 d h^2\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )+2 c \left (g \left (5 f g^2+6 e h g+15 d h^2\right ) b^2-6 a h \left (3 f g^2+3 e h g-d h^2\right ) b+4 a^2 h^2 (6 f g-e h)\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b h g+a h^2} \sqrt{c x^2+b x+a}}\right )}{256 \left (c g^2-b h g+a h^2\right )^{9/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 2.33474, antiderivative size = 826, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1650, 834, 806, 720, 724, 206} \[ \frac{\left (4 \left (3 f g^4+h (2 e g-27 d h) g^2\right ) c^2-2 h \left (b g \left (16 f g^2-21 e h g-54 d h^2\right )-2 a h \left (18 f g^2-33 e h g+8 d h^2\right )\right ) c-5 h^2 \left (\left (3 f g^2+3 e h g+7 d h^2\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{240 h \left (c g^2-b h g+a h^2\right )^3 (g+h x)^3}+\frac{\left (6 c f g^3+2 c h (2 e g-7 d h) g+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{40 h \left (c g^2-b h g+a h^2\right )^2 (g+h x)^4}-\frac{\left (f g^2-h (e g-d h)\right ) \left (c x^2+b x+a\right )^{3/2}}{5 h \left (c g^2-b h g+a h^2\right ) (g+h x)^5}+\frac{\left (32 c^3 d g^3-8 c^2 \left (a f g^2+2 b (e g+3 d h) g-3 a h (2 e g-d h)\right ) g+2 c \left (\left (5 f g^3+3 h (2 e g+5 d h) g\right ) b^2-6 a h \left (3 f g^2+h (3 e g-d h)\right ) b+4 a^2 h^2 (6 f g-e h)\right )-b h \left (\left (3 f g^2+h (3 e g+7 d h)\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{c x^2+b x+a}}{128 \left (c g^2-b h g+a h^2\right )^4 (g+h x)^2}-\frac{\left (b^2-4 a c\right ) \left (32 c^3 d g^3-8 c^2 \left (a f g^2+2 b (e g+3 d h) g-3 a h (2 e g-d h)\right ) g+2 c \left (\left (5 f g^3+3 h (2 e g+5 d h) g\right ) b^2-6 a h \left (3 f g^2+h (3 e g-d h)\right ) b+4 a^2 h^2 (6 f g-e h)\right )-b h \left (\left (3 f g^2+h (3 e g+7 d h)\right ) b^2-2 a h (6 f g+5 e h) b+16 a^2 f h^2\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b h g+a h^2} \sqrt{c x^2+b x+a}}\right )}{256 \left (c g^2-b h g+a h^2\right )^{9/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1650
Rule 834
Rule 806
Rule 720
Rule 724
Rule 206
Rubi steps
\begin{align*} \int \frac{\sqrt{a+b x+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^6} \, dx &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}-\frac{\int \frac{\left (\frac{1}{2} \left (-10 c d g+3 b e g+10 a f g-\frac{3 b f g^2}{h}+7 b d h-10 a e h\right )-\left (2 c e g-5 b f g+\frac{3 c f g^2}{h}-2 c d h+5 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{(g+h x)^5} \, dx}{5 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}+\frac{\left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{40 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^4}+\frac{\int \frac{\left (\frac{1}{4} \left (80 c^2 d g^2+80 a^2 f h^2-2 b c g \left (18 e g-\frac{3 f g^2}{h}+47 d h\right )-10 a b h (6 f g+5 e h)-16 a c \left (2 f g^2-h (7 e g-2 d h)\right )+5 b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )+\frac{c \left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) x}{2 h}\right ) \sqrt{a+b x+c x^2}}{(g+h x)^4} \, dx}{20 \left (c g^2-b g h+a h^2\right )^2}\\ &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}+\frac{\left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{40 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^4}+\frac{\left (4 c^2 \left (3 f g^4+g^2 h (2 e g-27 d h)\right )-5 h^2 \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+3 e g h+7 d h^2\right )\right )-2 c h \left (b g \left (16 f g^2-21 e g h-54 d h^2\right )-2 a h \left (18 f g^2-33 e g h+8 d h^2\right )\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{240 h \left (c g^2-b g h+a h^2\right )^3 (g+h x)^3}+\frac{\left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right ) \int \frac{\sqrt{a+b x+c x^2}}{(g+h x)^3} \, dx}{32 \left (c g^2-b g h+a h^2\right )^3}\\ &=\frac{\left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{128 \left (c g^2-b g h+a h^2\right )^4 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}+\frac{\left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{40 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^4}+\frac{\left (4 c^2 \left (3 f g^4+g^2 h (2 e g-27 d h)\right )-5 h^2 \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+3 e g h+7 d h^2\right )\right )-2 c h \left (b g \left (16 f g^2-21 e g h-54 d h^2\right )-2 a h \left (18 f g^2-33 e g h+8 d h^2\right )\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{240 h \left (c g^2-b g h+a h^2\right )^3 (g+h x)^3}-\frac{\left (\left (b^2-4 a c\right ) \left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{256 \left (c g^2-b g h+a h^2\right )^4}\\ &=\frac{\left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{128 \left (c g^2-b g h+a h^2\right )^4 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}+\frac{\left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{40 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^4}+\frac{\left (4 c^2 \left (3 f g^4+g^2 h (2 e g-27 d h)\right )-5 h^2 \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+3 e g h+7 d h^2\right )\right )-2 c h \left (b g \left (16 f g^2-21 e g h-54 d h^2\right )-2 a h \left (18 f g^2-33 e g h+8 d h^2\right )\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{240 h \left (c g^2-b g h+a h^2\right )^3 (g+h x)^3}+\frac{\left (\left (b^2-4 a c\right ) \left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac{-b g+2 a h-(2 c g-b h) x}{\sqrt{a+b x+c x^2}}\right )}{128 \left (c g^2-b g h+a h^2\right )^4}\\ &=\frac{\left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{128 \left (c g^2-b g h+a h^2\right )^4 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{5 h \left (c g^2-b g h+a h^2\right ) (g+h x)^5}+\frac{\left (6 c f g^3+2 c g h (2 e g-7 d h)+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{40 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^4}+\frac{\left (4 c^2 \left (3 f g^4+g^2 h (2 e g-27 d h)\right )-5 h^2 \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+3 e g h+7 d h^2\right )\right )-2 c h \left (b g \left (16 f g^2-21 e g h-54 d h^2\right )-2 a h \left (18 f g^2-33 e g h+8 d h^2\right )\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{240 h \left (c g^2-b g h+a h^2\right )^3 (g+h x)^3}-\frac{\left (b^2-4 a c\right ) \left (32 c^3 d g^3-8 c^2 g \left (a f g^2-3 a h (2 e g-d h)+2 b g (e g+3 d h)\right )+2 c \left (4 a^2 h^2 (6 f g-e h)-6 a b h \left (3 f g^2+h (3 e g-d h)\right )+b^2 \left (5 f g^3+3 g h (2 e g+5 d h)\right )\right )-b h \left (16 a^2 f h^2-2 a b h (6 f g+5 e h)+b^2 \left (3 f g^2+h (3 e g+7 d h)\right )\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b g h+a h^2} \sqrt{a+b x+c x^2}}\right )}{256 \left (c g^2-b g h+a h^2\right )^{9/2}}\\ \end{align*}
Mathematica [A] time = 6.32801, size = 1129, normalized size = 1.37 \[ \frac{\sqrt{a+x (b+c x)} \left (-\frac{\left (\frac{1}{2} h (3 b f g+4 c d h-10 a f h)-\frac{1}{2} g (6 c f g+4 c e h-7 b f h)\right ) \left (c x^2+b x+a\right )^{3/2}}{5 \left (c g^2-b h g+a h^2\right ) (g+h x)^5}-\frac{-\frac{\left (2 c g \left (3 c f g^2-5 f h (b g-a h)+2 c h (e g-d h)\right )-c h \left (3 b f g^2-b h (3 e g+7 d h)+10 h (c d g-a f g+a e h)\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{4 \left (c g^2-b h g+a h^2\right ) (g+h x)^4}-\frac{-\frac{\left (\frac{1}{2} c h \left (5 h \left (3 f g^2+h (3 e g+7 d h)\right ) b^2+2 \left (3 c f g^3-c h (18 e g+47 d h) g-5 a h^2 (6 f g+5 e h)\right ) b+16 h \left (5 c^2 d g^2+5 a^2 f h^2-a c \left (2 f g^2-h (7 e g-2 d h)\right )\right )\right )-c^2 g \left (6 c f g^3+2 c h (2 e g-7 d h) g+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right )\right ) \left (c x^2+b x+a\right )^{3/2}}{3 \left (c g^2-b h g+a h^2\right ) (g+h x)^3}-\frac{\left (b \left (g \left (6 c f g^3+2 c h (2 e g-7 d h) g+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) c^2+\frac{1}{2} h \left (5 h \left (3 f g^2+h (3 e g+7 d h)\right ) b^2+2 \left (3 c f g^3-c h (18 e g+47 d h) g-5 a h^2 (6 f g+5 e h)\right ) b+16 h \left (5 c^2 d g^2+5 a^2 f h^2-a c \left (2 f g^2-h (7 e g-2 d h)\right )\right )\right ) c\right )-2 \left (a h \left (6 c f g^3+2 c h (2 e g-7 d h) g+10 a h^2 (2 f g-e h)-b h \left (13 f g^2-h (3 e g+7 d h)\right )\right ) c^2+\frac{1}{2} g \left (5 h \left (3 f g^2+h (3 e g+7 d h)\right ) b^2+2 \left (3 c f g^3-c h (18 e g+47 d h) g-5 a h^2 (6 f g+5 e h)\right ) b+16 h \left (5 c^2 d g^2+5 a^2 f h^2-a c \left (2 f g^2-h (7 e g-2 d h)\right )\right )\right ) c^2\right )\right ) \left (\frac{\sqrt{c x^2+b x+a} (b g-2 a h+(2 c g-b h) x)}{4 \left (c g^2-b h g+a h^2\right ) (g+h x)^2}+\frac{\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{-b g+2 a h-(2 c g-b h) x}{2 \sqrt{c g^2-b h g+a h^2} \sqrt{c x^2+b x+a}}\right )}{2 \sqrt{c g^2-b h g+a h^2} \left (4 c g^2-4 b h g+4 a h^2\right )}\right )}{2 \left (c g^2-b h g+a h^2\right )}}{4 \left (c g^2-b h g+a h^2\right )}}{5 \left (c g^2-b h g+a h^2\right )}\right )}{2 c h \sqrt{c x^2+b x+a}}-\frac{f \left (c x^2+b x+a\right ) \sqrt{a+x (b+c x)}}{2 c h (g+h x)^5} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.292, size = 40336, normalized size = 49. \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]